CommonEvent 154
Name = "Reset: Final Chapter"

  999([154])
  ControlSwitches([2444, 2484, 1])
  ControlSwitches([2490, 2900, 1])
  ControlSwitches([3001, 4000, 1])
  ControlVariables([839, 858, 0, 0, 0])
  ControlVariables([1140, 1200, 0, 0, 0])
  ControlVariables([1301, 1500, 0, 0, 0])
  Comment(["天界ルート・魔界ルートワープフラグ消去"])
  Script(["switch_id = 5043"])
  ScriptMore(["last_switch_id = 5083"])
  ScriptMore(["switch_flag = 0"])
  ScriptMore([""])
  ScriptMore(["(switch_id..last_switch_id).each do |id|"])
  ScriptMore(["  $game_switches[id] = (switch_flag == 1)"])
  ScriptMore(["end"])
  Comment(["混沌ルートワープフラグ消去"])
  Script(["switch_id = 5090"])
  ScriptMore(["last_switch_id = 5200"])
  ScriptMore(["switch_flag = 0"])
  ScriptMore([""])
  ScriptMore(["(switch_id..last_switch_id).each do |id|"])
  ScriptMore(["  $game_switches[id] = (switch_flag == 1)"])
  ScriptMore(["end"])
  Comment(["マップのセルフスイッチ初期化"])
  Script(["map_id = 1001"])
  ScriptMore(["last_map_id = 1999"])
  ScriptMore([""])
  ScriptMore(["reset_selfswitch_map(*(map_id..last_map_id))"])
  Script(["map_id = 433"])
  ScriptMore(["last_map_id = 436"])
  ScriptMore([""])
  ScriptMore(["reset_selfswitch_map(*(map_id..last_map_id))"])
  Script(["map_id = 384"])
  ScriptMore(["last_map_id = 388"])
  ScriptMore([""])
  ScriptMore(["reset_selfswitch_map(*(map_id..last_map_id))"])
  Script(["reset_selfswitch_map(101,392,404,405)"])
  Comment(["エンカウント初期化"])
  Script(["change_region(1001,1,1)"])
  ScriptMore(["delete_encounter_airship(1287,2155)"])
  ScriptMore(["change_region(1156,0,0)"])
  ScriptMore(["change_region(1160,1,1)"])
  ScriptMore(["change_region(1165,1,1)"])
  ScriptMore(["change_region(1168,1,1)"])
  ChangeItems([568, 1, 0, 1])
  ChangeItems([569, 1, 0, 1])
  ChangeItems([570, 1, 0, 1])
  ChangeItems([571, 1, 0, 1])
  ChangeItems([572, 1, 0, 1])
  ChangeItems([573, 1, 0, 1])
  ChangeItems([574, 1, 0, 1])
  ChangeItems([575, 1, 0, 1])
  ChangeItems([576, 1, 0, 1])
  ChangeItems([577, 1, 0, 1])
  ChangeItems([579, 1, 0, 1])
  ChangeItems([580, 1, 0, 1])
  ChangeItems([581, 1, 0, 1])
  ChangeItems([582, 1, 0, 1])
  ChangeItems([583, 1, 0, 1])
  ChangeItems([584, 1, 0, 1])
  ChangeItems([585, 1, 0, 1])
  ChangeItems([586, 1, 0, 1])
  ChangeItems([587, 1, 0, 1])
  ChangeItems([588, 1, 0, 1])
  ChangeItems([589, 1, 0, 1])
  ChangeItems([590, 1, 0, 1])
  ChangeItems([591, 1, 0, 1])
  ChangeItems([597, 1, 0, 1])
  Empty([])
